<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<title>Document</title>
	</head>
	<body>
		<script src="./js/vue.js"></script>
		<div id="app">
			<p>{{fullName}}</p>
		</div>
		<script>
			let app = new Vue({
				el:"#app",
				data:{
					msg:'hello world',
					firstName:"shane",
					lastName:"He"
				},
				methods:{
					getFullName(){
						return this.firstName+""+this.lastName
					}
				},
				computed:{
					fullName(){
						//看起来是函数，但是把他当属性去理解
						//跟python中语法糖 @property类似
						return this.firstName+" "+this.lastName
					}
				}
			})
		</script>
	</body>
</html>
